/**
 * 
 */
package com.swim.employeeswim.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 员工Entity
 * @author 刘军武
 * @version 2021-04-23
 */
@Table(name="t_employee", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="natatorium_info_id", attrName="natatoriumInfoId", label="游泳馆信息id"),
		@Column(name="name", attrName="name", label="员工姓名"),
		@Column(name="role", attrName="role", label="角色"),
		@Column(name="user_code", attrName="userCode", label="登录账号"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class EmployeeSwim extends DataEntity<EmployeeSwim> {
	
	private static final long serialVersionUID = 1L;
	private String natatoriumInfoId;		// 游泳馆信息id
	private String name;		// 员工姓名
	private String role;		// 角色
	private String userCode;		// 登录账号
	
	public EmployeeSwim() {
		this(null);
	}

	public EmployeeSwim(String id){
		super(id);
	}
	
	public String getNatatoriumInfoId() {
		return natatoriumInfoId;
	}

	public void setNatatoriumInfoId(String natatoriumInfoId) {
		this.natatoriumInfoId = natatoriumInfoId;
	}
	
	@NotBlank(message="员工姓名不能为空")
	@Length(min=0, max=30, message="员工姓名长度不能超过 30 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="角色不能为空")
	@Length(min=0, max=20, message="角色长度不能超过 20 个字符")
	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}
	
	@NotBlank(message="登录账号不能为空")
	@Length(min=0, max=100, message="登录账号长度不能超过 100 个字符")
	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
}